package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysInspectMapper;
import com.ruoyi.system.domain.SysInspect;
import com.ruoyi.system.service.ISysInspectService;

/**
 * 点检与维护Service业务层处理
 *
 * @author ruoyi
 * @date 2023-12-04
 */
@Service
public class SysInspectServiceImpl implements ISysInspectService
{
    @Autowired
    private SysInspectMapper sysInspectMapper;

    /**
     * 查询点检与维护
     *
     * @param id 点检与维护主键
     * @return 点检与维护
     */
    @Override
    public SysInspect selectSysInspectById(Long id)
    {
        return sysInspectMapper.selectSysInspectById(id);
    }

    /**
     * 查询点检与维护列表
     *
     * @param sysInspect 点检与维护
     * @return 点检与维护
     */
    @Override
    public List<SysInspect> selectSysInspectList(SysInspect sysInspect)
    {
        return sysInspectMapper.selectSysInspectList(sysInspect);
    }

    /**
     * 新增点检与维护
     *
     * @param sysInspect 点检与维护
     * @return 结果
     */
    @Override
    public int insertSysInspect(SysInspect sysInspect)
    {
        sysInspect.setCreateTime(DateUtils.getNowDate());
        return sysInspectMapper.insertSysInspect(sysInspect);
    }

    /**
     * 修改点检与维护
     *
     * @param sysInspect 点检与维护
     * @return 结果
     */
    @Override
    public int updateSysInspect(SysInspect sysInspect)
    {
        sysInspect.setUpdateTime(DateUtils.getNowDate());
        return sysInspectMapper.updateSysInspect(sysInspect);
    }

    /**
     * 批量删除点检与维护
     *
     * @param ids 需要删除的点检与维护主键
     * @return 结果
     */
    @Override
    public int deleteSysInspectByIds(Long[] ids)
    {
        return sysInspectMapper.deleteSysInspectByIds(ids);
    }

    /**
     * 删除点检与维护信息
     *
     * @param id 点检与维护主键
     * @return 结果
     */
    @Override
    public int deleteSysInspectById(Long id)
    {
        return sysInspectMapper.deleteSysInspectById(id);
    }
}
